class Level < ActiveRecord::Base 
  def self.get_level_by_host(host)
    Level.find_last_by_host(host)
  end

  def self.set_level_map
    levels = Level.find :all
    $level_map.clear
    levels.each do |l|     
      $level_map[l.host.swapcase] = l
    end
  end
  
end
